<?php
/**
 * Copyright 2013 Marek Kaszewski
 *
 * This file is part of the JHUB1 Online Community Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

namespace Application\Model\SettingsObjects;

class UserLocalizationObject extends JSONable
{
    private $timezone = "Europe/London";
    private $dateformat = "dateFormat";
    private $timeformat = "timeFormat";
    private $language = "language";

    /**
     * @return string
     */
    public function getDateformat()
    {
        return $this->dateformat;
    }

    /**
     * @param string $dateFormat
     */
    public function setDateformat($dateFormat)
    {
        $this->dateformat = $dateFormat;
    }

    /**
     * @return string
     */
    public function getTimeformat()
    {
        return $this->timeformat;
    }

    /**
     * @param string $dateFormat
     */
    public function setTimeformat($timeFormat)
    {
        $this->timeformat = $timeFormat;
    }

    /**
     * @return string
     */
    public function getLanguage()
    {
        return $this->language;
    }

    /**
     * @param string $language
     */
    public function setLanguage($language)
    {
        $this->language = $language;
    }

    /**
     * @return string
     */
    public function getTimezone()
    {
        return $this->timezone;
    }

    /**
     * @param string $timezone
     */
    public function setTimezone($timezone)
    {
        $this->timezone = $timezone;
    }

    public function toString()
    {
        $string           = '    Timezone:    ' . $this->timezone . PHP_EOL;
        $string = $string . '    Date format: ' . $this->dateformat . PHP_EOL;
        $string = $string . '    Time format: ' . $this->timeformat . PHP_EOL;
        $string = $string . '    Language:    ' . $this->language;
        return $string;
    }
}